import React, {Component} from 'react';
import {View, Text} from 'react-native';
import {
  createStackNavigator,
  StackActions,
  NavigationActions,
} from '@react-navigation/stack';
import List from './list';
import Player from '../player/player';
import VIP from '../vip/vip';
import SongItem from './songItem';
import {NavigationContainer} from '@react-navigation/native';

import main from '../main/main';
import AlbumItem from './albumItem';
import header from '../header/header';
const Stack = createStackNavigator();

// const resetAction = StackActions.reset({
//   index: 0,
//   actions: [NavigationActions.navigate({routeName: 'Music'})],
// });

export default class albumStack extends Component {
  constructor(props) {
    super(props);
    console.log(this.props);

    // this.props.navigation.dispath(resetAction);
    this.state = {};
  }

  render() {
    return (
      // <NavigationContainer independent={false}>
      <Stack.Navigator initialRouteName="北城之音">
        <Stack.Screen
          name="北城之音"
          component={main}
          navigation={this.props}
        />
        <Stack.Screen
          name="音乐播放"
          component={Player}
          navigation={this.props}
        />
        <Stack.Screen name="购买会员" component={VIP} navigation={this.props} />
      </Stack.Navigator>
      // </NavigationContainer>
    );
  }
}
